Cancellable reset API is deprecated for long time and it's quite broken.
In fact if a search provider receives a cancelled event may end up
checking if the cancellable has been cancelled, but this may not be true
anymore after a reset.
Use instead new cancellable instances so that once one is used we can
consider the previous one completed and we can forget about it.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4080>
return;
this._cancellable.cancel();
- this._cancellable.reset();
+ this._cancellable = new Gio.Cancellable();
const metas = await this.provider.getResultMetas(metasNeeded, this._cancellable);
this._startingSearch = true;
this._cancellable.cancel();
- this._cancellable.reset();
+ this._cancellable = new Gio.Cancellable();
if (terms.length === 0) {
this._reset();